/*
 * @Author: 张昊
 * @Date:  2022-10-20 11:11:02
 * @FilePath: /common/api.js
 * @Description: In User Settings Edit
 */
const {
	http
} = uni.$u
// 获取菜单
// export const fetchMenu = (params, config = {}) => http.post('/ebapi/public_api/index', params, config)
// 首页
export const shopIndex = (params, config = {}) => http.post('addons/shop/index/index', params, config)
// 获取课程表滚动列表 
export const gundongkechengbiao = (params, config = {}) => http.post('/api/counsel.config/gundongkechengbiao', params,
	config)
// 获取轮播图列表 
export const banner = (params, config = {}) => http.post('/api/counsel.banner/index', params, config)
// 预约 获取老师列表 获取老师列表 
export const teacher = (params, config = {}) => http.post('api/counsel.teacher/index', params, config)

// POST 获取教室列表 /
export const getClassroomList = (params, config = {}) => http.post('api/counsel.config/getClassroomList', params,
	config)

// get 我的收藏 addons/shop/collect/index
export const collect = (params, config = {}) => http.get('addons/shop/collect/index', params, config)
// POST 添加取消收藏 addons/shop/collect/collect goods_id
export const collectStar = (params, config = {}) => http.post('addons/shop/collect/collect', params, config)





// 签到首页 addons/signin/api.index/index
export const signin = (params, config = {}) => http.get('addons/signin/api.index/index', params, config)
// 每月签到情况 
export const monthSign = (params, config = {}) => http.get('addons/signin/api.index/monthSign', params, config)
// GET 立即签到 
export const dosign = (params, config = {}) => http.get('addons/signin/api.index/dosign', params, config)
// GET 签到补签 
export const fillup = (params, config = {}) => http.get('addons/signin/api.index/fillup', params, config)
// GET 签到日志 
export const signLog = (params, config = {}) => http.get('addons/signin/api.index/signLog', params, config)
// GET 排行榜 
export const rank = (params, config = {}) => http.get('addons/signin/api.index/rank', params, config)
// get 首页海报图片以及地址 key =  'gzhhaibao'和'gzhhaibaourl'
export const configImg = (params, config = {}) => http.get('addons/shop/index/config', params, config)
// VIP课程 页面 Get 商品详情页 addons/shop/goods/index
export const goods = (params, config = {}) => http.get('addons/shop/goods/index', params, config)
// 商品公共课程1 其他课程列表id=24 商品列表 addons/shop/goods/get_list
export const get_list = (params, config = {}) => http.get('addons/shop/goods/get_list', params, config)
// 登录 一键微信登录
// 微信小程序授权登录 
export const oauthMiniUser = (params, config = {}) => http.get('api/counsel.user/oauthMiniUser', params, config)
// 登录相关
// POST 修改会员个人信息 /api/user/profile

// 名称	类型	必选	描述
// avatar	string	是	头像地址
// username	string	是	用户名
// nickname	string	是	昵称
// bio	string	是	个人简介
export const profile = (params, config = {}) => http.post('api/user/profile', params, config)
// POST 修改邮箱 /api/user/changeemail
// 名称	类型	必选	描述
// email	string	是	邮箱
// captcha	string	是	验证码
export const changeemail = (params, config = {}) => http.post('api/user/changeemail', params, config)
// POST 修改手机号 /api/user/changemobile

// 名称	类型	必选	描述
// mobile	string	是	手机号
// captcha	string	是	验证码
export const changemobile = (params, config = {}) => http.post('api/user/changemobile', params, config)




// 下单接口 addons/shop/checkout/submit 提交订单
export const submitShopping = (params, config = {}) => http.post('addons/shop/checkout/submit', params, config)
// 加入 添加购物车  sceneval 2 立即购买 1 加购  先立即购买 在提交订单
export const addShopping = (params, config = {}) => http.post('addons/shop/cart/add', params, config)
// 优惠券列表 addons/shop/coupon/myCoupon
export const myCoupon = (params, config = {}) => http.get('addons/shop/coupon/myCoupon', params, config)
// GET 优惠券列表 领券中心 addons/shop/coupon/index
export const couponReceive = (params, config = {}) => http.get('addons/shop/coupon/index', params, config)
// POST 领取优惠券 addons/shop/coupon/drawCoupon
export const drawCoupon = (params, config = {}) => http.post('addons/shop/coupon/drawCoupon', params, config)

//********* 用户个人信息 会员中心 /api/user/index 我的积分在里面
export const userIndex = (params, config = {}) => http.get('api/user/index', params, config)
// 添加购物车 
export const addCart = (params, config = {}) => http.post('addons/shop/checkout/submit', params, config)
// POST 支付页 addons/shop/payment/index
export const payment = (params, config = {}) => http.post('addons/shop/payment/index', params, config)

// post 积分记录列表
// 
// 名称	类型	必选	描述
// page	string	是	页码
// limit	string	是	每页个数
export const scoreloglist = (params, config = {}) => http.post('api/user/scoreloglist', params, config)

// 教师认证 POST 绑定老师 /api/counsel.teacher.center/bind
export const teacherCenter = (params, config = {}) => http.post('api/counsel.teacher.center/bind', params, config)
// 名称	类型	必选	描述
// name	string	是	名字
// mobile	string	是	手机号


// 买课页面  GET 我的订单 addons/shop/order/index
export const order = (params, config = {}) => http.get('addons/shop/order/index', params, config)
// 名称	类型	必选	描述
// num	string	是	每页个数
// orderstate	string	是	订单状态
// shippingstate	string	是	发货状态
// paystate	string	是	支付状态
// q	string	是	单号/商品名

// 教师点击完结预约 POST 完结订单 
export const complete = (params, config = {}) => http.post('/api/counsel.teacher.order/complete', params, config)

// POST 申请取消预约 
export const refund = (params, config = {}) => http.post('/api/counsel.order/refund', params, config)


// POST 预约老师 提交订单 
export const collectSubmit = (params, config = {}) => http.post('api/counsel.order/submit', params, config)
// 预约老师需要的时间段请求器
// POST 获取预约时间段列表 
export const counselTimes = (params, config = {}) => http.post('/api/counsel.times/index', params, config)

// POST 老师预约 订单列表 
export const counselTeacherOrder = (params, config = {}) => http.post('api/counsel.teacher.order/index', params, config)

// POST 学生预约 订单列表 /api/counsel.order/index
export const counselOrder = (params, config = {}) => http.post('/api/counsel.order/index', params, config)


// 手机号解码 GET 微信小程序获取手机号 
export const getuserphonenumber = (params, config = {}) => http.get('/api/counsel.user/getuserphonenumber', params,
	config)

// POST 获取老师工资列表 
export const gongzi = (params, config = {}) => http.post('/api/counsel.teacher/gongzi', params, config)

// 公众号图片列表 POST获取公众号图列表 /api/counsel.banner/gzhimg
export const gzhimg = (params, config = {}) => http.post('/api/counsel.banner/gzhimg', params, config)

// 获取最新消息速递列表 
export const gzhhuodong = (params, config = {}) => http.post('/api/counsel.banner/gzhhuodong', params, config)


// POST 取消订单 
export const cancel = (params, config = {}) => http.post('/addons/shop/order/cancel', params, config)


// POST
// 获取老师工资构成
export const gongzigoucheng = (params, config = {}) => http.post('/api/counsel.teacher/gongzigoucheng', params, config)


// GET 我的地址 
export const myAddress = (params, config = {}) => http.get('/addons/shop/address/index', params, config)
// GET 根据id获取地址 
export const myAddressEdit = (params, config = {}) => http.get('/addons/shop/address/edit', params, config)

// POST 保存地址 
export const myAddressSave = (params, config = {}) => http.post('/addons/shop/address/save', params, config)

// POST 删除地址 
export const myAddressDel = (params, config = {}) => http.post('/addons/shop/address/del', params, config)

// POST 设置默认地址 
export const myAddressSetdefault = (params, config = {}) => http.post('/addons/shop/address/setdefault', params, config)

// GET 读取省市区数据,联动列表
export const myAddressArea = (params, config = {}) => http.get('/addons/shop/address/area', params, config)


// POST 提交订单 
export const orderSubmit = (params, config = {}) => http.post('/api/counsel.order/submit', params, config)

// POST 获取预约时间段列表 
export const timesIndex = (params, config = {}) => http.post('/api/counsel.times/index', params, config)
